<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flex弹性布局</title>
    <style>
        *{
            margin:0;
            padding:0;
        }

        .box{
            background:#000;
            width:500px;
            display: flex;
            height:500px;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
        }
        .box div{
            border:1px solid red;
            text-align: center;
            font-size:30px;
            line-height: 100px;
            background:#fff;
            height:100px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>111112213411</div>
        <div>1</div>
        <div>1</div>
        <div>1</div>
    </div>
</body>
</html>